﻿using System;

namespace MyLib.Data {
	/// <summary>
	/// 
	/// </summary>
	public static class DbTypeHelper {
		/// <summary>
		/// 
		/// </summary>
		/// <param name="year"></param>
		/// <param name="month"></param>
		/// <param name="day"></param>
		/// <returns></returns>
		public static DateTime ToLocalTime(int year, int month, int day) {
			return ToLocalTime(year, month, day, 0, 0, 0);
		} // end of ToLocalTime.

		/// <summary>
		/// 
		/// </summary>
		/// <param name="year"></param>
		/// <param name="month"></param>
		/// <param name="day"></param>
		/// <param name="hour"></param>
		/// <param name="minute"></param>
		/// <param name="second"></param>
		/// <returns></returns>
		public static DateTime ToLocalTime(int year, int month, int day, int hour, int minute, int second) {
			return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc).ToLocalTime();
		} // end of ToLocalTime.
	} // end of DbTypeHelper.
}
